package com.cloudfun.campusshare.repo;


import com.cloudfun.campusshare.entity.AppEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * @author linyangping
 * @date 2019/11/6
 */
public interface AppEntityRepo extends
        PagingAndSortingRepository<AppEntity, String>,
        JpaSpecificationExecutor<AppEntity> {

    AppEntity findByUserIdAndId(String userId, String id);

    AppEntity findByAppKey(String appKey);

    AppEntity findByProdAppKey(String prodAppKey);

    AppEntity findByNameAndStatusNot(String name, int status);

    List<AppEntity> findByUserIdAndStatus(String userId, int status);
}
